{extend name="./static/page/admin_tpl.html" /}

{block name="header_title"}大话软件后台{/block}
{block name="page_css"}
<link href="{$__TEMPLETE__}/css/admin/label/editLabel.css" rel="stylesheet">
{/block}

{block name="content"}
<div class="col-md-12 right-section">
    <!--内容区域-->
    <h3>
        标签编辑
        <div class="operation-div">
        </div>
    </h3>
    <div class="inner-section row">
        <div id="content">
            <form action="#" method="post" id="myForm"  enctype="multipart/form-data">
                <table class="table table-striped table-hover table-bordered table-base">
                    <tr>
                        <td class="td1"><label><span class="must-tag">*</span>标签名称</label></td>
                        <td class="td2"><input type="text" class="form-control" id="name" name="name" value="{$labelInfo.name}" placeholder="标签名称"></td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td class="td1"><label><span class="must-tag">&nbsp;&nbsp;</span>缩略图</label></td>
                        <td class="td2"><img src="{$__LOD__.$labelInfo.thumb}" height="40"></td>
                        <td class="td3"></td>
                    </tr>

                    <tr>
                        <td><label for="imgurl"><span class="must-tag">&nbsp;&nbsp;</span>图片更新</label></td>
                        <td>
                            <input type="hidden" name="prevurl" value="{$__LOD__.$labelInfo.image}">
                            <!---是否重新上传图片标识 0未更新，1更新图片-->
                            <input type="hidden" id="imgFlag" name="imgFlag" value="0">
                            <input class="imgurl form-control"  accept="image/*" title="支持jpg、jpeg、gif、png格式，文件小于5M" tabindex="3" type="file" id="imgurl" name="imgurl" size="3">
                            &nbsp;&nbsp;图片建议尺寸：100px*100px
                        </td>
                        <td></td>
                    </tr>
                    <!--{if $labelInfo.ad_image}-->
                    <tr>
                        <td class="td1"><label><span class="must-tag">&nbsp;&nbsp;</span>广告图片</label></td>
                        <td class="td2"><img src="{$labelInfo.ad_image}" height="40"></td>
                        <td class="td3"></td>
                    </tr>
                    <!--{/if}-->
                    <tr>
                        <td><label for="ad_image"><span class="must-tag">&nbsp;&nbsp;</span>广告更新</label></td>
                        <td>
                            <input type="hidden" name="prevurl2" value="{$labelInfo.ad_image}">
                            <!---是否重新上传图片标识 0未更新，1更新图片-->
                            <input type="hidden" id="imgFlag2" name="imgFlag2" value="0">
                            <input class="imgurl form-control"  accept="image/*" title="支持jpg、jpeg、gif、png格式，文件小于5M" tabindex="3" type="file" id="ad_image" name="ad_image" size="3">
                            &nbsp;&nbsp;图片建议尺寸：宽度640px
                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td><label for="link"><span>&nbsp;&nbsp;</span>广告图片链接</label></td>
                        <td class="td2"><input type="text" class="form-control" id="link" name="link" placeholder="如http://www.changekeji.com" {if $labelInfo.link} value="{$labelInfo.link}" {/if}</td>
                        <td class="td3"></td>
                    </tr>
                    <tr>
                        <td><label for="order_index"><span class="must-tag">&nbsp;&nbsp;</span>排序系数</label></td>
                        <td><input type="text" class="form-control" name="order_index" id="order_index" placeholder="排序系数" value="{$labelInfo.order_index}"></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td><label for="goods_num"><span class="must-tag">&nbsp;&nbsp;</span>显示商品数量</label></td>
                        <td><input type="text" class="form-control" name="goods_num" id="goods_num" placeholder="商品数量" value="{$labelInfo.goods_num}"></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td><label><span class="must-tag">&nbsp;&nbsp;</span>绑定商品</label></td>
                        <td>
                            <div class="select-goods-area"><a data-toggle="modal" class="btn btn-primary btn-sm select-goods" href="{:url('admin/Storelabel/showBindGoods')}" data-target="#bindLabelDialog">选择商品</a></div>

                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>

                        </td>
                        <td>
                            <input type="hidden" name="gids" id="gids" value="{$labelInfo.gids}">
                            <input type="hidden" name="id" value="{$labelInfo.id}">
                            <button type="button" class="btn btn-success btn-md" id='save'>提交</button>
                            <a class="btn btn-default btn-md" href="javascript:window.history.go(-1);">返回</a>
                        </td>
                        <td></td>
                    </tr>
                </table>

            </form>
        </div>

    </div>
</div>
{/block}
{block name="page_js"}
<script src="{$__TEMPLETE__}/js/admin/petAticle/editLabel.js"></script>
{/block}

